1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and an image processing program. In particular, the present invention relates to an image processing apparatus, an image processing method, and an image processing program, which is capable of various gradation adjustments to an input image and background adjustment of the image.
2. Description of Related Art
Various image processing apparatuses such as copying machine capable of a gradation adjustment based on various γ curves corresponding to various adjustment contents such as a density adjustment, a contrast adjustment, a background adjustment, a red color adjustment, a blue color adjustment, and a green color adjustment (including adjustment level) have been developed so far. In particular, recently, image processing apparatuses capable of a gradation adjustment based on a plurality of γ curves corresponding to not only the above adjustment contents but also contents of various combined adjustments (hereinafter, referred to as combined adjustment) composed by combining a plurality of adjustment contents have been devised as described in JP-Tokukaihei-7-95406A and JP-Tokukaihei-8-32807A.
This γ curve is represented by a gradation adjustment function representing correlation between gradation of an input image (hereinafter referred to as input gradation) and gradation of an output image after the gradation adjustment (hereinafter referred to as output gradation). This gradation adjustment function (hereinafter referred to as a γ curve) corresponds to table data (referred to as gradation adjustment data) for indicating the output gradation for every input gradation. Hereinafter, each of a γ curve, a gradation function and gradation adjustment data denotes the same meaning.
That is, the above image processing apparatus stores the above gradation adjustment data in a memory which is previously provided in a storage section. During the gradation adjustment, the above image processing apparatus performs the gradation adjustment on the basis of the gradation adjustment data.
However, the above conventional techniques have the following problems.
That is, a large amount of gradation data corresponding to not only the gradation adjustment corresponding to the density adjustment, the contrast adjustment, the background adjustment, the red color adjustment, the blue color adjustment, and the green color adjustment (including adjustment level), but also various combined adjustments composed by combining the plurality of these adjustments, must be stored previously in a storage section of the above conventional image processing apparatus in order to perform the gradation adjustment. Consequently, a great amount of memory capacity is required.
On the other hand, it can be considered to limit combination contents (combination patterns deciding adjustments to be combined) in order to make the memory capacity smaller. However, in such case, it is hard to realize a huge variety of combination patterns.
Further, historically, an image processing apparatus such as a copying machine calculates approximate lightness representing lights/darks of an image on the basis of luminance of input image data obtained from the input image, adjusts the approximate lightness of the input image data on the basis of a previously set background adjustment γ curve, and makes output image data on the basis of the approximate lightness after the adjustment.
Hereupon, the luminance is represented by an integer from 0 to 255 standardized in 8 bits data. Further, the highs/lows of the approximate lightness corresponds to the lights/darks of the image.
                              b          =                                                    a                255                                      ×            255                          ⁢                                  ⁢                  (                                    a              ⁢                              :                            ⁢                                                          ⁢              luminance                        ,                          b              ⁢                              :                            ⁢                                                          ⁢              approximate              ⁢                                                          ⁢              lightness                                )                                    [                  Formula          ⁢                                          ⁢          1                ]            
Hereupon, the calculated lightness b is an integer equal to or more than 0 and equal to or less than 255 rounded off after the decimal point thereof.
The density of an image is calculated by the following formula on the basis of the luminance. Hereupon, the density is defined as “c”.
                    C        =                  -                                    Log              10                        ⁡                          (                                                                    10                                          -                      0.03                                                        255                                ⁢                a                            )                                                          [                  Formula          ⁢                                          ⁢          2                ]            
Hereinafter, explanations will be provided by using the approximate lightness. However, it is possible to convert the approximate lightness into the luminance or the density and use them as needed by using the above formulas 1 and 2. For example, the approximate lightness of 150, 200, 225 and 255 are converted into the density of 0.492, 0.241, 0.140 and 0.030, respectively (each of the density is calculated to three places of decimals).
The above adjustment of the approximate lightness will be described with reference to FIG. 10. In this case, the abscissa axis represents the approximate lightness of the input image data and the longitudinal axis represents the approximate lightness of the output image data.
In a background adjustment γ curve X1 shown in FIG. 10, when the background lightening is performed by setting the approximate lightness of the output image data to be higher with respect to a background part (lighter area of which approximate lightness is equal to or more than 150, shown by a note B1 in FIG. 10) of which the approximate lightness is relatively low, the gradient of the background adjustment γ curve is set to be more than 1 with respect to whole area (0 to 255) of the approximate lightness of the input image data, and the approximate lightness of the output image data is set to be higher totally.
Further, in a background adjustment γ curve X2 shown in FIG. 10, when the approximate lightness of the output image data is set to be lower and the background is enhanced (hereinafter referred to as highlight enhancing) with respect to the background, the gradient of background adjustment γ curve is set to be less than 1 with respect to whole area of the approximate lightness of the input image data, and the approximate lightness of the output image data is set to be lower totally.
Hereinafter, the adjustment of the approximate lightness with respect to the background as described above may be referred to as the background adjustment.
Hereupon, the background adjustment γ curve represents the correlation between the approximate lightness of the input image data and the approximate lightness of the output image data. For example, when the approximate lightness of the input image data and the approximate lightness of the output image data are the same each other, the background adjustment γ curve representing the correlation between both approximate lightness is represented as a straight line of which gradient is 1.
When the background lightening is performed in the above way, a show-through part, which is the part of a backside image seen through a foreside of an original, is enhanced despite the intention. Further, when the highlight enhancing is performed in the above way, the background is enhanced and accordingly background fogging occurs. On the other hand, the technique capable of removing the show-through part while performing the background lightening has been developed recently as shown in JP-Tokukai-2002-314814A. However, because the technique described in JP-Tokukai-2002-314814A needs the processing using the filter for removing the show-through part in addition to the processing using the above-described background adjustment γ curve, the processing flow becomes complicated. Furthermore, because the show-through part is removed with the same filter regardless of the degree of lights/darks of the show-through part, the difference of subtle lights/darks of the background is uniformly smoothed, and accordingly the reproducibility of the output image is decreased. Furthermore, it is still difficult to solve the problem that the background is enhanced and accordingly background fogging occurs when the highlight enhancing is performed in the above way, as described above.